package com.uit.ecommerce.bo;

import com.uit.ecommerce.access.mapper.CountryMapper;
import com.uit.ecommerce.dto.CountryDTO;
import java.util.ArrayList;

public class CountryBO {
public ArrayList<CountryDTO> getAllCountry() throws Exception{
    CountryMapper CM =new CountryMapper();
    return CM.GetAllCountry();
}
public ArrayList<CountryDTO> getAllCountryByName(String Name) throws Exception{
    CountryMapper CM =new CountryMapper();
    return CM.GetCountryName(Name);
}
public CountryDTO getCountryById(String ID) throws Exception{
    CountryMapper CM =new CountryMapper();
    return CM.GetCountryID(ID);
}
public void InsertCountry(CountryDTO cls) throws Exception{
    CountryMapper CM =new CountryMapper();
    CM.insertCountry(cls);
}
public void DeleteCountry(String ID) throws Exception{
    CountryMapper CM =new CountryMapper();
    CM.DeleteCountry(ID);
}
public boolean CheckCountryExit(String Id) throws Exception{
    CountryMapper CM =new CountryMapper();
   return CM.checkCountryExit(Id);
}
}
